#include<stdio.h>
#include<string.h>
#include<unistd.h>

#define N 102

int main()
{
    char bar[N];
    memset(bar,0,sizeof(bar));
    const char* sign="|/-\\";
    int num = 0;
    while(num <= 100)
    {
        printf("[%-100s][%d%%] %c\r",bar,num,sign[num%4]);
        bar[num] = '|';
        num++;
        fflush(stdout);
        usleep(30000);

    }
    printf("\n");
    return 0;
}

